const express = require('express');
// const userCrt = require('../controller/userCrt');
// const viewsCrt = require('../controller/viewsCrt');
// const childrenRouter = require('./childrenRouter');
const myFiles = require('../controller/files.js');

// express有提供一个顶级的路由模块。直接使用
const router = express.Router();

router.post('/updateFiles', myFiles.updateFiles)

router.get('/', myFiles.index)
router.get('/index', myFiles.index)
router.get('/showFiles', myFiles.showFiles)
router.get('/encodeUsername', myFiles.encryptionUsername)

// router.get('/hello', userCrt.hello)
// router.post('/login', userCrt.userLogin)
// router.post('/register', userCrt.register)

// 配置子路由
// router.use(childrenRouter)

// 使用ejs引擎的方式渲染页面
// router.get('/ejsIndex', viewsCrt.index)

module.exports = router